﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Wiko_Placemarks
{
    public partial class message : Form
    {
        public message(String Title, String Msg, int symbol)
        {
            InitializeComponent();
            this.Text = Title;
            label1.Text = Msg;
            switch (symbol)
            {
                case 0:
                    {
                        picErr.Visible = true;
                        break;
                    }
                case 1:
                    {
                        picAdd.Visible = true;
                        break;
                    }
                case 2:
                    {
                        picSaved.Visible = true;
                        break;
                    }
            }
        }

        private void openError_Load(object sender, EventArgs e)
        {
            timerup.Enabled = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void timerup_Tick(object sender, EventArgs e)
        {
            if (this.Opacity < 1.0) this.Opacity += 0.01;
            else
            {
                timerup.Enabled = false;
                timerdn.Enabled = true;
            }
        }

        private void timerdn_Tick(object sender, EventArgs e)
        {
            if (this.Opacity > 0.9) this.Opacity -= 0.01;
            else
            {
                timerup.Enabled = true;
                timerdn.Enabled = false;
            }
        }
    }
}
